<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>

<link href='http://fonts.googleapis.com/css?family=Archivo+Narrow:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/font-awesome.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/owl.carousel.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/boss_carousel.css" media="all" />

<?php 
$respon = $this->config->get('b_General_Respon');
if (isset($respon)==false || (isset($respon) && $respon==1)) {  ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/responsive.css" media="all" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/unsemantic/unsemantic-grid-base.css" media="all" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/boss_add_cart.css" />

<?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) { ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/safari.css" />
<?php } ?>

<script type="text/javascript" src="catalog/view/javascript/common.js"></script>

<script type="text/javascript" src="catalog/view/javascript/bossthemes/bossthemes.js"></script>
<script type="text/javascript" src="catalog/view/javascript/bossthemes/notify.js"></script>
<script type="text/javascript" src="catalog/view/javascript/bossthemes/jquery.smoothscroll.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/bossthemes/getwidthbrowser.js"></script>

<?php if (isset($respon)==false || (isset($respon) && $respon==1)) {  ?>
	<script>
		  var ADAPT_CONFIG = {
			path: 'catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/unsemantic/',
			dynamic: true,
			range: [
			  '0 to 767px = unsemantic-grid-mobile.css',
			  '767 to 1024px = unsemantic-grid-tablet.css',
			  '1024px = unsemantic-grid-desktop.css'
			]
		  };
	</script>
	<script>
	if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
	  var viewportmeta = document.querySelector('meta[name="viewport"]');
	  if (viewportmeta) {
	    viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
	    document.addEventListener('gesturestart', function() {
	      viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
	    }, false);
	  }
	}
	 </script>
	 <script type="text/javascript" src="catalog/view/javascript/bossthemes/unsemantic/adapt.min.js"></script>
<?php } else { ?>
	<script>
		$(document).ready(function() {
			var body = $("body").outerWidth();
			if(body > 1200){
				$("#container").css("width", body);
			}else{
				$("#container").css("width", 1200);
			}
		});
	</script>
	<link href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/unsemantic/unsemantic-grid-desktop.css" rel="stylesheet" type="text/css" media="all" />
<?php } ?>
<!--[if IE 8]> 
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/ie8.css" />
<![endif]-->
<!--[if IE 7]> 
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/ie7.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/bossthemes/font-awesome-ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->

<?php /******************THEME FONTS SETTINGS*********************/ ?>
<?php if (isset($respon)==true) {  ?>
<?php include "catalog/view/theme/".$this->config->get('config_template')."/template/bossthemes/Boss_font_setting.php"; ?>
<?php include "catalog/view/theme/".$this->config->get('config_template')."/template/bossthemes/Boss_color_setting.php"; ?>
<?php } ?>
<script>  
if (/*@cc_on!@*/false) {  
    document.documentElement.className+=' ie10';  
}  
</script>
<?php if ($stores) { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
<?php foreach ($stores as $store) { ?>
$('body').prepend('<iframe src="<?php echo $store; ?>" style="display: none;"></iframe>');
<?php } ?>
});
//--></script>
<?php } ?>

<?php 
$customcode = array();
$customcode =  $this->config->get('customcode');
?>
<!-- custom css-->
<?php if($customcode['custom_css']){ ?>
	<style type="text/css">
	<?php echo $customcode['custom_css'];?>
	</style>
<?php } ?>
<!-- end custom css-->

<!-- custom javascript-->
<?php if($customcode['custom_java']){ ?>
	<script type="text/javascript"><!--
	<?php echo $customcode['custom_java']; ?>
	//--></script>
<?php } ?>
<!-- end custom javascript-->

<?php echo $google_analytics; ?>
    <script type="text/javascript" src="catalog/view/javascript/jquery/tap/jquery.tap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/stylesheet/tai.css" />
</head>
<?php 
	$array = (explode('/',$_SERVER['REQUEST_URI']));
	$end = end($array);
	if($end == "index.php" || $end == "home" || $end == ""){
		$home_page='home_page';
	}else{
		$home_page="other_page";
	}
?>



<body class="<?php echo $home_page; ?>">
<?php 
require_once( DIR_TEMPLATE.$this->config->get('config_template')."/template/bossthemes/boss_library.php" );
$helper = ThemeControlHelper::getInstance( $this->registry,$this->config->get('config_template'));
?>
<?php
$b_Mode_CSS = $this->config->get('b_Mode_CSS');
if(!isset($b_Mode_CSS)){
	$b_Mode_CSS ="wide";
}
?>
<div id="container" class="<?php echo $b_Mode_CSS; ?>">
<div class="frame_container">
<div id="boss-header">
<div id="header" class="header">
<div class="header-top">
	<div class="grid-container">
		<div class="grid-100 tablet-grid-100 mobile-grid-100">
			<div class="header-top-left">
				<div id="welcome">
					<?php if (!$logged) { ?>
					<?php echo $text_welcome; ?>
					<?php } else { ?>
					<?php echo $text_logged; ?>
					<?php } ?>
				</div>		
			</div>
			<div class="header-top-right">
				<div class="links">
					<a class="m-home" href="<?php echo $home; ?>"><?php echo $text_home; ?></a>
					<a class="m-account" href="<?php echo $account; ?>"><?php echo $text_account; ?></a>
					<a class="m-shoppingcart" href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a>
					<a class="m-checkout" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>
				</div>			
				
				<?php echo $currency; ?>
				<?php echo $language; ?>
			</div>
		</div>
	</div>
</div>
<div class="header-mid">
	<div class="grid-container">
		<div class="grid-100 tablet-grid-100 mobile-grid-100">
			<?php if ($logo) { ?>
				<div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
			<?php } ?>
			<!-- Block Header Top-->	
			
			<?php echo $helper->getBlockByPosition('b_Block_Header_Top'); ?>
			
			<!--div id="search">
				<div class="button-search" title="<?php echo $text_search; ?>"></div>
				<input type="text" name="search" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />
			</di-->
		</div>
		
	</div>
</div>
</div>
<div class="header-bottom">
	<div class="grid-container">
		<div class="grid-100 tablet-grid-100 mobile-grid-100">
		<div  class="header-bottom-1">
		

		<!-- cart-->
		<?php echo $cart; ?>
		<!-- Boss search-->
		<?php if(isset($boss_search)){echo $boss_search;} ?>
		
		<!-- Megamenu Position-->		
		<?php	
			$modules =$helper->getModulesByPosition('mainmenu'); 
			if( $modules ){
				foreach ($modules as $module) { 
					 echo $module; 
				} 
			} 
		?>

		<!-- Block Header Bottom-->		
		<?php echo $helper->getBlockByPosition('b_Block_Header_Bottom'); ?>

		<!-- Header Position -->
		<?php
			$modules =$helper->getModulesByPosition('header'); 
			if( $modules ){
				foreach ($modules as $module) {
					echo $module;
				} 
			} 
		?>
		
		<!-- Slideshow Position-->
		<?php
			$modules =$helper->getModulesByPosition('slideshow'); 
			if( $modules ){
				foreach ($modules as $module) { 
					echo $module; 
				} 
			} 
		?>
		</div>
		</div>
	</div>
</div>

</div>


<div id="notification"></div>
<?php if ($error) { ?>
	<div class="warning"><?php echo $error ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<div class="grid-container page">
<div class="grid-100 tablet-grid-100 mobile-grid-100">

<div class="clear"></div>
